<template>
    <div id="OrderDetails">
        <el-button type="primary" class="goback" @click="goback">返回上一级</el-button>
        <div class="table" v-loading="loading">
            <h3 class="title">详情</h3>
            <div v-for="(item,key) in tabData" :key="key" >
                <div class="tab-item" v-if="item&&list[key]">
                     <div class="tab-name">{{list[key]}}：</div>
                    <div class="tab-val" v-if="list[item.name]== '实物拍照'">
                        <a v-for="(val,idx) in imgArr" :key="idx" :href="val" target="_blank">
                            <img :src="val" alt="" style="width:150px;height:150px;margin-right:10px;margin-bottom:10px;" title="点击查看大图">
                        </a>

                    </div>
                    <span class="tab-val" v-else>{{item}}</span>
                </div>
               
            </div>
        </div>



    </div>
</template>

<script>
    import Data from './applicationDetailsData.js'
    import dialogVue from '@/components/dialog.vue'
    import tableVue from '@/components/alltable.vue'
export default {
    components : {
        tableVue,
        dialogVue
    },
    data(){
        return JSON.parse(JSON.stringify(Data))
    },
    mounted(){
        this.tabData = this.$route.query.data 
        console.log(this.tabData)
    },
    methods:{
        goback(){ //返回上一级
            this.$router.push({name:'application'})
        }
    }
}
</script>
<style scoped lang="css">
    #OrderDetails{
        width:100%;
        height: 100%;
    }
    .title{
        width: 100%;
        text-align: center;

    }
    .goback{
        margin-top: 15px;
    }
    .table{
        width:800px;
        border: 1px solid #ccc;
        background-color: #fff;
        margin-top: 20px;

    }
    /* .tab-item:last-child{
        border-bottom: 1px solid #ccc;
    } */
    .tab-val{
        display: flex;
        flex-wrap: wrap;
        padding-left: 20px;
        border-left: 1px solid #ccc;
        box-sizing: border-box;
          min-height: 60px;
        align-items: center;
        padding-top:10px;

    }
    .tab-item{
        width: 100%;
        display: flex;
        padding:0 10px;
        box-sizing: border-box;
         border-top: 1px solid #ccc;
        min-height: 60px;
        align-items: center;
    }
    .tab-item .tab-name{
        min-width: 120px;
        min-height: 60px;

        display: flex;
        align-items: center;
    }

</style>
